import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      keepAlive: true,
    },
  },
  {
    path: '/transferStop',
    name: 'TransferStop',
    component: () => import('../views/TransferStop.vue'),
  },
  {
    path: '/songlist',
    name: 'SongList',
    component: () => import('../views/SongList.vue'),
  },
  {
    path: '/songlists',
    name: 'SongLists',
    component: () => import('../views/SongLists.vue'),
  },
  {
    path: '/singerdetails',
    name: 'SingerDetails',
    component: () => import('../views/SingerDetails.vue'),
  },
  {
    path: '/play',
    name: 'Play',
    component: () => import('../views/Play.vue'),
  },
  {
    path: '/albumart',
    name: 'AlbumArt',
    component: () => import('../views/AlbumArt.vue'),
  },
  {
    path: '/userinfo',
    name: 'UserInfo',
    component: () => import('../views/UserInfo.vue'),
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes,
})

export default router
